package cn.com.hd.mall.web.webservices.entity;

import cn.com.hd.mall.web.webservices.constant.WebservicesConstant;

public class BasePageRequest extends BaseRequest {

    private static final long serialVersionUID = 1820354282576704753L;
    /**
     * 页码
     */
    public int page = WebservicesConstant.PAGE_CURRENT;
    /**
     * 每页行数
     */
    private int rows = WebservicesConstant.PAGE_SIZE;

    public int getPage() {
        if (this.page < 1) {
            return WebservicesConstant.PAGE_CURRENT;
        } else {
            return this.page;
        }
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getRows() {
        if (this.rows < 1) {
            return WebservicesConstant.PAGE_SIZE;
        } else {
            return this.rows;
        }
    }

    public void setRows(int rows) {
        this.rows = rows;
    }
}